def isPrime(x:int)-> bool:
        if x < 2:
            return False
        i = 2
        while i * i <= x:
            if x % i == 0:
                return False
            i+=1
        return True

def bit_count(n):  
    return bin(n).count('1')  
def countPrimeSetBits(left: int, right: int) -> int:
    return sum(isPrime(bit_count(x)) for x in range (left,right+1))
    

res = countPrimeSetBits(6,10)
print("res",res)
